package com.ibsol.commands
{
	import com.adobe.cairngorm.commands.ICommand;
	import com.adobe.cairngorm.control.CairngormEvent;
	import com.ibsol.business.DemoDelegate;
	import com.ibsol.model.DemoModel;

	import mx.rpc.IResponder;

	public class EchoFromJavaCommand implements ICommand, IResponder
	{
		public function EchoFromJavaCommand()
		{
		}

		public function execute(event:CairngormEvent):void
		{
			// myEvent(event).myData
			var delegate:DemoDelegate=new DemoDelegate(this);
			delegate.echoFromJava();
		}

		public function result(data:Object):void
		{
			DemoModel.getInstance().echoString=data.result;
		}

		public function fault(info:Object):void
		{
			trace(info);
		}

	}
}